package org.lex.game.sudoku.model.builder;

import org.lex.game.sudoku.model.SudokuModel;
import org.lex.game.sudoku.model.SudokuModelListener.Cause;

public class PredifinedSudokuBuilder implements SudokuBuilder {

	private static final int[][] SUDOKU = { { 7, 0, 0, 0, 2, 9, 0, 0, 8 },// 1
			{ 8, 9, 4, 5, 0, 0, 0, 1, 0 },// 2
			{ 3, 2, 5, 0, 1, 6, 0, 0, 0 }, // 3
			{ 9, 0, 2, 3, 0, 0, 0, 6, 0 },// 4
			{ 4, 6, 0, 0, 9, 0, 7, 0, 0 }, // 5
			{ 1, 0, 8, 6, 5, 4, 0, 0, 3 },// 6
			{ 0, 4, 1, 2, 6, 3, 0, 7, 0 },// 7
			{ 0, 8, 7, 9, 0, 1, 3, 5, 6 },// 8
			{ 0, 0, 9, 7, 8, 5, 4, 0, 0 } // 9
	};

	public void build(SudokuModel model) {
		for (int row = 0; row < 9; row++) {
			for (int col = 0; col < 9; col++) {
				model.set(Cause.SYSTEM, row, col, SUDOKU[row][col]);
			}
		}
	}

}
